$(function(){
        const parase1=new Promise((resolve,reject)=>{
        $.ajax('${baseUrl}/posts/count',{   
            success:function(res){
                console.log('获取成功',res);
                resolve(res)    
            },
            error:function(err){
                console.log('获取失败',err);
                reject(err) 
            }
        })
    })

    const parase2=new Promise((resolve,reject)=>{
        $.ajax('$(baseUrl)/categories/count',{
            success:function(res){
                console.log('获取成功',res);
                resolve(res)
            },
            error:function(err){
                console.log('获取失败',err);
                reject(err)
            }
        })
    })

    const parase3=new Promise((resolve,reject)=>{
        $.ajax('http://192.168.2.100:3001/comments/count',{
            success:function(res){
                console.log('获取成功',res);
                resolve(res)
            },
            error:function(err){
                console.log('获取失败',err);
                reject(err)
            }
        })
    })

    Promise.all([parase1,parase2,parase3]).then(res=>{
        console.log('Promise',res);
        let tempObj={}
        res.forEach(item=>{
            for(let key in item){
                tempObj[key]=item[key]
            }
        })
        console.log(tempObj);   
        
    }).catch((err)=>{
        console.log('promiseall',err);
    })
})